<?php 
require dirname(__FILE__).'/../mpdf/mpdf.php';
class PdfHelper{
	
	public static function export($data = array()){
		if (empty($data['file_name'])) return '';
		$ini_val =  ini_get("magic_quotes_runtime");
		ini_set("magic_quotes_runtime", 0);
		$mpdf=new mPDF('+aCJK','A4','','',10,10,10,10,16,13); 
		$mpdf->SetDisplayMode('fullpage');
		$mpdf->SetAutoFont(AUTOFONT_ALL);
		$mpdf->WriteHTML($data['content']);
		$mpdf->Output($data['file_name'].'.pdf', 'I');
		ini_set("magic_quotes_runtime", $ini_val);
	}
}
